|
In mathematics, given a collection of subsets of a set ''X'', an exact cover is a subcollection of such that each element in ''X'' is contained in ''exactly one'' subset in . One says that each element in ''X'' is covered by exactly one subset in . An exact cover is a kind of cover. In computer science, the exact cover problem is a decision problem to determine if an exact cover exists. The exact cover problem is NP-complete〔 This book is a classic, developing the theory, then cataloguing ''many'' NP-Complete problems. 〕 and is one of Karp's 21 NP-complete problems.〔 〕 The exact cover problem is a kind of constraint satisfaction problem. An exact cover problem can be represented by an incidence matrix or a bipartite graph. Knuth's Algorithm X is an algorithm that finds all solutions to an exact cover problem. DLX is the name given to Algorithm X when it is implemented efficiently using Donald Knuth's Dancing Links technique on a computer.〔 The standard exact cover problem can be generalized slightly to involve not only "exactly one" constraints but also "at-most-one" constraints. Finding Pentomino tilings and solving Sudoku are noteworthy examples of exact cover problems. The N queens problem is a slightly generalized exact cover problem. == Formal definition == Given a collection of subsets of a set ''X'', an exact cover of ''X'' is a subcollection of that satisfies two conditions: * The intersection of any two distinct subsets in is empty, i.e., the subsets in are pairwise disjoint. In other words, each element in ''X'' is contained in ''at most one'' subset in . * The union of the subsets in is ''X'', i.e., the subsets in cover ''X''. In other words, each element in ''X'' is contained in ''at least one'' subset in . In short, an exact cover is "exact" in the sense that each element in ''X'' is contained in ''exactly one'' subset in . Equivalently, an exact cover of ''X'' is a subcollection of that partitions ''X''. For an exact cover of ''X'' to exist, it is necessary that: * The union of the subsets in is ''X''. In other words, each element in ''X'' is contained in at least one subset in . If the empty set ∅ is contained in , then it makes no difference whether or not it is in any exact cover. Thus it is typical to assume that: * The empty set is not in . In other words, each subset in contains at least one element. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Exact cover」の詳細全文を読む スポンサード リンク
|